from pydantic import BaseSettings, PostgresDsn
from functools import lru_cache


class Settings(BaseSettings):
    # Neo4j配置
    neo4j_uri: str = "bolt://localhost:7687"
    neo4j_user: str = "neo4j"
    neo4j_password: str = "password"

    # 文件存储配置
    storage_endpoint: str = "https://storage.example.com"
    storage_bucket: str = "chemical-kg"

    class Config:
        env_file = ".env"

    @classmethod
    @lru_cache()
    def get_settings(cls):
        return cls()